<% provide(:page_title, titleize(t(:authors_index))) %>
<div class="page-header">
    <h1><%= titleize(t(:authors_index))%></h1>
</div>
<div class="well">

<div class="row">
  <div class="col-md-6">
      <div class="form-group">
         <div class="col-sm-12" style="margin-left: 20px">
             <%= will_paginate %>
         </div>
      </div>
  </div>
  <div class="col-md-6">
    <%= form_tag authors_path, method: :get do %>
     <div class="input-group" style="margin: 40px 0">
        <input id="author_search" name="author_search" type="text" class="form-control" placeholder="<%=t(:author_search)%>">
        <span class="input-group-btn">
           <input type="submit" class="btn btn-primary" id="search_for_author" value=" <%=titleize(t(:search))%>" />
        </span>
      </div>                       
      <% end %>
  </div>
</div>

<ul class="people">
  <%= render @authors %>
</ul>

<div class="row">
  <div class="col-md-6">
      <div class="form-group">
         <div class="col-sm-12" style="margin-left: 20px">
             <%= will_paginate %>
         </div>
      </div>
  </div>
</div>

<% if signed_in? && current_user.admin? %>
    <%= link_to titleize(t(:add_author)), new_author_path %>
<% end %>
</div>
